#pragma once

#include "..\Math\Matrix4x4.h"

#include "SceneNodeProperties.h"

#include "Scene.h"

#include "RayCast.h"

class ISceneNode
{
	public:

		virtual const SceneNodeProperties * const Get() const = 0;

		virtual void SetTransform(
			const Matrix4x4 *toWorld, 
			const Matrix4x4 *fromWorld = NULL) = 0;

		virtual HRESULT OnUpdate(
			Scene *pScene, 
			DWORD const elapsedMs) = 0;

		virtual HRESULT OnRestore(Scene *pScene) = 0;

		virtual HRESULT PreRender(Scene *pScene) = 0;
		
		virtual bool IsVisible(Scene *pScene) const = 0;
		
		virtual HRESULT Render(Scene *pScene) = 0;
		
		virtual HRESULT RenderChildren(Scene *pScene) = 0;
		
		virtual HRESULT PostRender(Scene *pScene) = 0;

		virtual bool AddChild(shared_ptr<ISceneNode> kid) = 0;

		virtual bool RemoveChild(ActorId id) = 0;

		virtual HRESULT OnLostDevice(Scene *pScene) = 0;

		virtual HRESULT Pick(Scene *pScene, RayCast *pRayCast) = 0;

		virtual ~ISceneNode() { };
};